<?php
$receivers = array(
	'name'	=> 'receivers',
	'id'	=> 'receivers',
	'value'	=> (set_value('receivers'))?set_value('receivers'):((isset($sendto)?$sendto:'')),
	'size' 	=> 30,
);
/*
$subject = array(
	'name'	=> 'subject',
	'id'	=> 'subject',
	'value'	=> set_value('subject'),
	'size'	=> 30,
);
 * */
$body = array(
	'name'	=> 'body',
	'id'	=> 'body',
	'value'	=> set_value('body'),
	'cols' 	=> 30,
	'rows' 	=> 10,
);

?>
<?php
	$attribute = array('id'=>'sendmessage_form'); 
	echo form_open('#',$attribute);
?>
<table>
	<tr>
		<td><?php echo form_label('致：', $receivers['id']); ?></td>
		<td><?php echo form_input($receivers); ?><span style="color: red;"><?php echo form_error($receivers['name']); ?><?php echo isset($errors[$receivers['name']])?$errors[$receivers['name']]:''; ?></span></td>
	</tr>
	<!--<tr>
		<td><?php echo form_label('標題', $subject['id']); ?></td>
		<td><?php echo form_input($subject); ?><span style="color: red;"><?php echo form_error($subject['name']); ?><?php echo isset($errors[$subject['name']])?$errors[$subject['name']]:''; ?></span></td>
	</tr>
	-->
	<tr>
		<td><?php echo form_label('內容', $body['id']); ?></td>
		<td><?php echo form_textarea($body); ?></td>
	</tr>
</table>
<span><input type="button" value="發送" name="Send" onclick="SendNewMessageData();"/></span><span id="pm_loading"></span>
<?php echo form_close(); ?>